// SPDX-License-Identifier: GPL-2.0
/* Copyright(c) 2022 Huawei Technologies Co., Ltd */
#ifndef HIUDK_SDK_CRM_ADPT_H
#define HIUDK_SDK_CRM_ADPT_H

#if defined(HIUDK_SDK_ADPT) && defined(HIUDK_SDK)
#include "hiudk_sdk_crm.h"

static inline bool sdk_get_stateful_enable(void *udkdev)
{
	void *sdk_hwdev = NULL;

	if (!CHECK_UDK_DEV(udkdev)) {
		pr_err("udkdev is error! \n");
		return false;
	}

	sdk_hwdev = GET_SDKHWDEV_FROM_HIUDKHWDEV(udkdev);
	return hinic3_get_stateful_enable(sdk_hwdev);
}

static inline bool sdk_get_timer_enable(void *udkdev)
{
	void *sdk_hwdev = NULL;
	if (!CHECK_UDK_DEV(udkdev)) {
		pr_err("udkdev is error! \n");
		return false;
	}
	sdk_hwdev = GET_SDKHWDEV_FROM_HIUDKHWDEV(udkdev);
	return hinic3_get_timer_enable(sdk_hwdev);
}

static inline u16 sdk_glb_pf_vf_offset(void *udkdev)
{
	void *sdk_hwdev = NULL;
	if (!CHECK_UDK_DEV(udkdev)) {
		pr_err("udkdev is error! \n");
		return 0;
	}

	sdk_hwdev = GET_SDKHWDEV_FROM_HIUDKHWDEV(udkdev);
	return hinic3_glb_pf_vf_offset(sdk_hwdev);
}

static inline u8 sdk_get_bond_create_mode(void *udkdev)
{
	void *sdk_hwdev = NULL;

	if (!CHECK_UDK_DEV(udkdev)) {
		pr_err("udkdev is error! \n");
		return 0;
	}

	sdk_hwdev = GET_SDKHWDEV_FROM_HIUDKHWDEV(udkdev);
	return hinic3_get_bond_create_mode(sdk_hwdev);
}

static inline u16 sdk_global_func_id(void *udkdev)
{
	void *sdk_hwdev = NULL;

	if (!CHECK_UDK_DEV(udkdev)) {
		pr_err("udkdev is error! \n");
		return 0;
	}

	sdk_hwdev = GET_SDKHWDEV_FROM_HIUDKHWDEV(udkdev);
	return hinic3_global_func_id(sdk_hwdev);
}

static inline u8 sdk_host_id(void *udkdev)
{
	void *sdk_hwdev = NULL;

	if (!CHECK_UDK_DEV(udkdev)) {
		pr_err("udkdev is error! \n");
		return 0;
	}

	sdk_hwdev = GET_SDKHWDEV_FROM_HIUDKHWDEV(udkdev);
	return hinic3_host_id(sdk_hwdev);
}

static inline u8 sdk_host_oq_id_mask(void *udkdev)
{
	void *sdk_hwdev = NULL;

	if (!CHECK_UDK_DEV(udkdev)) {
		pr_err("udkdev is error! \n");
		return 0;
	}

	sdk_hwdev = GET_SDKHWDEV_FROM_HIUDKHWDEV(udkdev);
	return hinic3_host_oq_id_mask(sdk_hwdev);
}

static inline u16 sdk_host_total_func(void *udkdev)
{
	void *sdk_hwdev = NULL;

	if (!CHECK_UDK_DEV(udkdev)) {
		pr_err("udkdev is error! \n");
		return 0;
	}

	sdk_hwdev = GET_SDKHWDEV_FROM_HIUDKHWDEV(udkdev);
	return hinic3_host_total_func(sdk_hwdev);
}

static inline u16 sdk_intr_num(void *udkdev)
{
	void *sdk_hwdev = NULL;

	if (!CHECK_UDK_DEV(udkdev)) {
		pr_err("udkdev is error! \n");
		return 0;
	}

	sdk_hwdev = GET_SDKHWDEV_FROM_HIUDKHWDEV(udkdev);
	return hinic3_intr_num(sdk_hwdev);
}

static inline u8 sdk_max_pf_num(void *udkdev)
{
	void *sdk_hwdev = NULL;

	if (!CHECK_UDK_DEV(udkdev)) {
		pr_err("udkdev is error! \n");
		return 0;
	}

	sdk_hwdev = GET_SDKHWDEV_FROM_HIUDKHWDEV(udkdev);
	return hinic3_max_pf_num(sdk_hwdev);
}

static inline void sdk_misx_intr_clear_resend_bit(void *udkdev, u16 msix_idx, u8 clear_resend_en)
{
	void *sdk_hwdev = NULL;

	if (!CHECK_UDK_DEV(udkdev)) {
		pr_err("udkdev is error! \n");
		return;
	}

	sdk_hwdev = GET_SDKHWDEV_FROM_HIUDKHWDEV(udkdev);
	return hinic3_misx_intr_clear_resend_bit(sdk_hwdev, msix_idx, clear_resend_en);
}

static inline u8 sdk_pcie_itf_id(void *udkdev)
{
	void *sdk_hwdev = NULL;

	if (!CHECK_UDK_DEV(udkdev)) {
		pr_err("udkdev is error! \n");
		return 0;
	}

	sdk_hwdev = GET_SDKHWDEV_FROM_HIUDKHWDEV(udkdev);
	return hinic3_pcie_itf_id(sdk_hwdev);
}

static inline u8 sdk_pf_id_of_vf(void *udkdev)
{
	void *sdk_hwdev = NULL;

	if (!CHECK_UDK_DEV(udkdev)) {
		pr_err("udkdev is error! \n");
		return 0;
	}

	sdk_hwdev = GET_SDKHWDEV_FROM_HIUDKHWDEV(udkdev);
	return hinic3_pf_id_of_vf(sdk_hwdev);
}

static inline u8 sdk_physical_port_id(void *udkdev)
{
	void *sdk_hwdev = NULL;

	if (!CHECK_UDK_DEV(udkdev)) {
		pr_err("udkdev is error! \n");
		return 0;
	}

	sdk_hwdev = GET_SDKHWDEV_FROM_HIUDKHWDEV(udkdev);
	return hinic3_physical_port_id(sdk_hwdev);
}

static inline u8 sdk_ppf_idx(void *udkdev)
{
	void *sdk_hwdev = NULL;

	if (!CHECK_UDK_DEV(udkdev)) {
		pr_err("udkdev is error! \n");
		return 0;
	}

	sdk_hwdev = GET_SDKHWDEV_FROM_HIUDKHWDEV(udkdev);
	return hinic3_ppf_idx(sdk_hwdev);
}

static inline int sdk_set_func_svc_used_state(void *udkdev, u16 svc_type, u8 state, u16 channel)
{
	void *sdk_hwdev = NULL;

	if (!CHECK_UDK_DEV(udkdev)) {
		pr_err("udkdev is error! \n");
		return -EINVAL;
	}

	sdk_hwdev = GET_SDKHWDEV_FROM_HIUDKHWDEV(udkdev);
	return hinic3_set_func_svc_used_state(sdk_hwdev, svc_type, state, channel);
}

static inline int sdk_set_interrupt_cfg(void *udkdev, struct interrupt_info interrupt_info, u16 channel)
{
	void *sdk_hwdev = NULL;

	if (!CHECK_UDK_DEV(udkdev)) {
		pr_err("udkdev is error! \n");
		return -EINVAL;
	}

	sdk_hwdev = GET_SDKHWDEV_FROM_HIUDKHWDEV(udkdev);
	return hinic3_set_interrupt_cfg(sdk_hwdev, interrupt_info, channel);
}

static inline void sdk_set_msix_auto_mask_state(void *udkdev, u16 msix_idx,
						enum hinic3_msix_auto_mask flag)
{
	void *sdk_hwdev = NULL;

	if (!CHECK_UDK_DEV(udkdev)) {
		pr_err("udkdev is error! \n");
		return;
	}

	sdk_hwdev = GET_SDKHWDEV_FROM_HIUDKHWDEV(udkdev);
	return hinic3_set_msix_auto_mask_state(sdk_hwdev, msix_idx, flag);
}

static inline void sdk_set_msix_state(void *udkdev, u16 msix_idx, enum hinic3_msix_state flag)
{
	void *sdk_hwdev = NULL;

	if (!CHECK_UDK_DEV(udkdev)) {
		pr_err("udkdev is error! \n");
		return;
	}

	sdk_hwdev = GET_SDKHWDEV_FROM_HIUDKHWDEV(udkdev);
	return hinic3_set_msix_state(sdk_hwdev, msix_idx, flag);
}

static inline int sdk_set_ppf_flr_type(void *udkdev, enum hinic3_ppf_flr_type flr_type)
{
	void *sdk_hwdev = NULL;

	if (!CHECK_UDK_DEV(udkdev)) {
		pr_err("udkdev is error! \n");
		return -EINVAL;
	}

	sdk_hwdev = GET_SDKHWDEV_FROM_HIUDKHWDEV(udkdev);
	return hinic3_set_ppf_flr_type(sdk_hwdev, flr_type);
}

static inline void sdk_stateful_deinit(void *udkdev)
{
	void *sdk_hwdev = NULL;

	if (!CHECK_UDK_DEV(udkdev)) {
		pr_err("udkdev is error! \n");
		return;
	}

	sdk_hwdev = GET_SDKHWDEV_FROM_HIUDKHWDEV(udkdev);
	return hinic3_stateful_deinit(sdk_hwdev);
}

static inline int sdk_stateful_init(void *udkdev)
{
	void *sdk_hwdev = NULL;

	if (!CHECK_UDK_DEV(udkdev)) {
		pr_err("udkdev is error! \n");
		return -EINVAL;
	}

	sdk_hwdev = GET_SDKHWDEV_FROM_HIUDKHWDEV(udkdev);
	return hinic3_stateful_init(sdk_hwdev);
}

static inline bool sdk_support_ppa(void *udkdev, struct ppa_service_cap *cap)
{
	void *sdk_hwdev = NULL;

	if (!CHECK_UDK_DEV(udkdev)) {
		pr_err("udkdev is error! \n");
		return false;
	}

	sdk_hwdev = GET_SDKHWDEV_FROM_HIUDKHWDEV(udkdev);
	return hinic3_support_ppa(sdk_hwdev, cap);
}

static inline bool sdk_support_fc(void *udkdev, struct fc_service_cap *cap)
{
	void *sdk_hwdev = NULL;

	if (!CHECK_UDK_DEV(udkdev)) {
		pr_err("udkdev is error! \n");
		return false;
	}

	sdk_hwdev = GET_SDKHWDEV_FROM_HIUDKHWDEV(udkdev);
	return hinic3_support_fc(sdk_hwdev, cap);
}

static inline bool sdk_support_ipsec(void *udkdev, struct ipsec_service_cap *cap)
{
	void *sdk_hwdev = NULL;

	if (!CHECK_UDK_DEV(udkdev)) {
		pr_err("udkdev is error! \n");
		return false;
	}

	sdk_hwdev = GET_SDKHWDEV_FROM_HIUDKHWDEV(udkdev);
	return hinic3_support_ipsec(sdk_hwdev, cap);
}

static inline bool sdk_support_migr(void *udkdev, struct migr_service_cap *cap)
{
	void *sdk_hwdev = NULL;

	if (!CHECK_UDK_DEV(udkdev)) {
		pr_err("udkdev is error! \n");
		return false;
	}

	sdk_hwdev = GET_SDKHWDEV_FROM_HIUDKHWDEV(udkdev);
	return hinic3_support_migr(sdk_hwdev, cap);
}

static inline bool sdk_support_nic(void *udkdev, struct nic_service_cap *cap)
{
	void *sdk_hwdev = NULL;

	if (!CHECK_UDK_DEV(udkdev)) {
		pr_err("udkdev is error! \n");
		return false;
	}

	sdk_hwdev = GET_SDKHWDEV_FROM_HIUDKHWDEV(udkdev);
	return hinic3_support_nic(sdk_hwdev, cap);
}

static inline bool sdk_support_ovs(void *udkdev, struct ovs_service_cap *cap)
{
	void *sdk_hwdev = NULL;

	if (!CHECK_UDK_DEV(udkdev)) {
		pr_err("udkdev is error! \n");
		return false;
	}

	sdk_hwdev = GET_SDKHWDEV_FROM_HIUDKHWDEV(udkdev);
	return hinic3_support_ovs(sdk_hwdev, cap);
}

static inline bool sdk_support_vbs(void *udkdev, struct vbs_service_cap *cap)
{
	void *sdk_hwdev = NULL;

	if (!CHECK_UDK_DEV(udkdev)) {
		pr_err("udkdev is error! \n");
		return false;
	}

	sdk_hwdev = GET_SDKHWDEV_FROM_HIUDKHWDEV(udkdev);
	return hinic3_support_vbs(sdk_hwdev, cap);
}

static inline bool sdk_support_rdma(void *udkdev, struct rdma_service_cap *cap)
{
	void *sdk_hwdev = NULL;

	if (!CHECK_UDK_DEV(udkdev)) {
		pr_err("udkdev is error! \n");
		return false;
	}

	sdk_hwdev = GET_SDKHWDEV_FROM_HIUDKHWDEV(udkdev);
	return hinic3_support_rdma(sdk_hwdev, cap);
}

static inline bool sdk_support_roce(void *udkdev, struct rdma_service_cap *cap)
{
	void *sdk_hwdev = NULL;

	if (!CHECK_UDK_DEV(udkdev)) {
		pr_err("udkdev is error! \n");
		return false;
	}

	sdk_hwdev = GET_SDKHWDEV_FROM_HIUDKHWDEV(udkdev);
	return hinic3_support_roce(sdk_hwdev, cap);
}

static inline bool sdk_support_toe(void *udkdev, struct toe_service_cap *cap)
{
	void *sdk_hwdev = NULL;

	if (!CHECK_UDK_DEV(udkdev)) {
		pr_err("udkdev is error! \n");
		return false;
	}

	sdk_hwdev = GET_SDKHWDEV_FROM_HIUDKHWDEV(udkdev);
	return hinic3_support_toe(sdk_hwdev, cap);
}

static inline int sdk_vector_to_eqn(void *udkdev, enum hinic3_service_type type, int vector)
{
	void *sdk_hwdev = NULL;

	if (!CHECK_UDK_DEV(udkdev)) {
		pr_err("udkdev is error! \n");
		return -EINVAL;
	}

	sdk_hwdev = GET_SDKHWDEV_FROM_HIUDKHWDEV(udkdev);
	return hinic3_vector_to_eqn(sdk_hwdev, type, vector);
}

static inline u8 sdk_vf_in_pf(void *udkdev)
{
	void *sdk_hwdev = NULL;

	if (!CHECK_UDK_DEV(udkdev)) {
		pr_err("udkdev is error! \n");
		return 0;
	}

	sdk_hwdev = GET_SDKHWDEV_FROM_HIUDKHWDEV(udkdev);
	return hinic3_vf_in_pf(sdk_hwdev);
}

static inline int sdk_get_slave_host_enable(void *udkdev, u8 host_id, u8 *slave_en)
{
	void *sdk_hwdev = NULL;

	if (!CHECK_UDK_DEV(udkdev)) {
		pr_err("udkdev is error! \n");
		return -EINVAL;
	}

	sdk_hwdev = GET_SDKHWDEV_FROM_HIUDKHWDEV(udkdev);
	return hinic3_get_slave_host_enable(sdk_hwdev, host_id, slave_en);
}

static inline int sdk_get_slave_bitmap(void *udkdev, u8 *slave_host_bitmap)
{
	void *sdk_hwdev = NULL;

	if (!CHECK_UDK_DEV(udkdev)) {
		pr_err("udkdev is error! \n");
		return -EINVAL;
	}

	sdk_hwdev = GET_SDKHWDEV_FROM_HIUDKHWDEV(udkdev);
	return hinic3_get_slave_bitmap(sdk_hwdev, slave_host_bitmap);
}

static inline int sdk_set_host_migrate_enable(void *udkdev, u8 host_id, bool enable)
{
	void *sdk_hwdev = NULL;

	if (!CHECK_UDK_DEV(udkdev)) {
		pr_err("udkdev is error! \n");
		return -EINVAL;
	}

	sdk_hwdev = GET_SDKHWDEV_FROM_HIUDKHWDEV(udkdev);
	return hinic3_set_host_migrate_enable(sdk_hwdev, host_id, enable);
}

static inline int sdk_get_host_migrate_enable(void *udkdev, u8 host_id, u8 *migrate_en)
{
	void *sdk_hwdev = NULL;

	if (!CHECK_UDK_DEV(udkdev)) {
		pr_err("udkdev is error! \n");
		return -EINVAL;
	}

	sdk_hwdev = GET_SDKHWDEV_FROM_HIUDKHWDEV(udkdev);
	return hinic3_get_host_migrate_enable(sdk_hwdev, host_id, migrate_en);
}

static inline int sdk_is_slave_func(void *udkdev, bool *is_slave_func)
{
	void *sdk_hwdev = NULL;

	if (!CHECK_UDK_DEV(udkdev)) {
		pr_err("udkdev is error! \n");
		return -EINVAL;
	}

	sdk_hwdev = GET_SDKHWDEV_FROM_HIUDKHWDEV(udkdev);
	return hinic3_is_slave_func(sdk_hwdev, is_slave_func);
}

static inline int sdk_is_master_func(void *udkdev, bool *is_master_func)
{
	void *sdk_hwdev = NULL;

	if (!CHECK_UDK_DEV(udkdev)) {
		pr_err("udkdev is error! \n");
		return -EINVAL;
	}

	sdk_hwdev = GET_SDKHWDEV_FROM_HIUDKHWDEV(udkdev);
	return hinic3_is_master_func(sdk_hwdev, is_master_func);
}

static inline bool sdk_is_multi_bm(void *udkdev)
{
	void *sdk_hwdev = NULL;

	if (!CHECK_UDK_DEV(udkdev)) {
		pr_err("udkdev is error! \n");
		return false;
	}

	sdk_hwdev = GET_SDKHWDEV_FROM_HIUDKHWDEV(udkdev);
	return hinic3_is_multi_bm(sdk_hwdev);
}

static inline bool sdk_is_slave_host(void *udkdev)
{
	void *sdk_hwdev;

	if (!CHECK_UDK_DEV(udkdev)) {
		pr_err("udkdev is error! \n");
		return false;
	}

	sdk_hwdev = GET_SDKHWDEV_FROM_HIUDKHWDEV(udkdev);
	return hinic3_is_slave_host(sdk_hwdev);
}

static inline bool sdk_is_vm_slave_host(void *udkdev)
{
	void *sdk_hwdev;

	if (!CHECK_UDK_DEV(udkdev)) {
		pr_err("udkdev is error! \n");
		return false;
	}

	sdk_hwdev = GET_SDKHWDEV_FROM_HIUDKHWDEV(udkdev);
	return hinic3_is_vm_slave_host(sdk_hwdev);
}

static inline bool sdk_is_bm_slave_host(void *udkdev)
{
	void *sdk_hwdev;

	if (!CHECK_UDK_DEV(udkdev)) {
		pr_err("udkdev is error! \n");
		return false;
	}

	sdk_hwdev = GET_SDKHWDEV_FROM_HIUDKHWDEV(udkdev);
	return hinic3_is_bm_slave_host(sdk_hwdev);
}

static inline bool sdk_is_guest_vmsec_enable(void *udkdev)
{
    void *sdk_hwdev;

    if (!CHECK_UDK_DEV(udkdev)) {
        pr_err("udkdev is error! \n");
        return false;
    }

    sdk_hwdev = GET_SDKHWDEV_FROM_HIUDKHWDEV(udkdev);
    return hinic3_is_guest_vmsec_enable(sdk_hwdev);
}

static inline int sdk_get_vfid_by_vfpci(void *udkdev, struct pci_dev *pdev, u16 *global_func_id)
{
    void *sdk_hwdev;

    if (!CHECK_UDK_DEV(udkdev)) {
        pr_err("udkdev is error!\n");
        return false;
    }

    sdk_hwdev = GET_SDKHWDEV_FROM_HIUDKHWDEV(udkdev);
    return hinic3_get_vfid_by_vfpci(sdk_hwdev, pdev, global_func_id);
}

static inline int sdk_set_func_nic_state(void *udkdev, struct hinic3_func_nic_state *state)
{
	void *sdk_hwdev = NULL;

	if (!CHECK_UDK_DEV(udkdev)) {
		pr_err("udkdev is error! \n");
		return -EINVAL;
	}

	sdk_hwdev = GET_SDKHWDEV_FROM_HIUDKHWDEV(udkdev);
	return hinic3_set_func_nic_state(sdk_hwdev, state);
}

static inline int sdk_get_netdev_state(void *udkdev, u16 func_idx, int *opened)
{
	void *sdk_hwdev = NULL;

	if (!CHECK_UDK_DEV(udkdev)) {
		pr_err("udkdev is error! \n");
	}

	sdk_hwdev = GET_SDKHWDEV_FROM_HIUDKHWDEV(udkdev);
	return hinic3_get_netdev_state(sdk_hwdev, func_idx, opened);
}

static inline int sdk_get_mhost_func_nic_enable(void *udkdev, u16 func_id, bool *en)
{
	void *sdk_hwdev = NULL;

	if (!CHECK_UDK_DEV(udkdev)) {
		pr_err("udkdev is error! \n");
		return -EINVAL;
	}

	sdk_hwdev = GET_SDKHWDEV_FROM_HIUDKHWDEV(udkdev);
	return hinic3_get_mhost_func_nic_enable(sdk_hwdev, func_id, en);
}

static inline int sdk_get_dev_cap(void *udkdev)
{
	void *sdk_hwdev = NULL;

	if (!CHECK_UDK_DEV(udkdev)) {
		pr_err("udkdev is error! \n");
		return -EINVAL;
	}

	sdk_hwdev = GET_SDKHWDEV_FROM_HIUDKHWDEV(udkdev);
	return hinic3_get_dev_cap(sdk_hwdev);
}

static inline int sdk_mbox_to_host_sync(void *udkdev, enum hinic3_mod_type mod,
				u8 cmd, void *buf_in, u16 in_size,
				void *buf_out, u16 *out_size, u32 timeout, u16 channel)
{
	void *sdk_hwdev;

	if (!CHECK_UDK_DEV(udkdev)) {
		pr_err("udkdev is error!\n");
	}

	sdk_hwdev = GET_SDKHWDEV_FROM_HIUDKHWDEV(udkdev);
	return hinic3_mbox_to_host_sync(sdk_hwdev, mod, cmd, buf_in, in_size, buf_out, out_size, timeout, channel);
}

static inline int sdk_get_func_vroce_enable(void *udkdev, u16 glb_func_idx, u8 *en)
{
	void *sdk_hwdev;

	if (!CHECK_UDK_DEV(udkdev)) {
		pr_err("udkdev is error!\n");
	}

	sdk_hwdev = GET_SDKHWDEV_FROM_HIUDKHWDEV(udkdev);
	return hinic3_get_func_vroce_enable(sdk_hwdev, glb_func_idx, en);
}

#define hinic3_is_slave_func sdk_is_slave_func
#define hinic3_is_master_func sdk_is_master_func
#define hinic3_is_multi_bm sdk_is_multi_bm
#define hinic3_is_slave_host sdk_is_slave_host
#define hinic3_is_vm_slave_host sdk_is_vm_slave_host
#define hinic3_is_bm_slave_host sdk_is_bm_slave_host
#define hinic3_is_guest_vmsec_enable sdk_is_guest_vmsec_enable
#define hinic3_get_vfid_by_vfpci sdk_get_vfid_by_vfpci
#define hinic3_set_func_nic_state sdk_set_func_nic_state
#define hinic3_get_netdev_state sdk_get_netdev_state
#define hinic3_get_dev_cap sdk_get_dev_cap
#define hinic3_get_mhost_func_nic_enable sdk_get_mhost_func_nic_enable
#define hinic3_mbox_to_host_sync sdk_mbox_to_host_sync
#define hinic3_get_func_vroce_enable sdk_get_func_vroce_enable

#define hinic3_get_slave_bitmap sdk_get_slave_bitmap
#define hinic3_get_slave_host_enable   sdk_get_slave_host_enable

#define hinic3_set_host_migrate_enable sdk_set_host_migrate_enable
#define hinic3_get_host_migrate_enable sdk_get_host_migrate_enable

#define hinic3_get_stateful_enable   sdk_get_stateful_enable
#define hinic3_get_timer_enable   sdk_get_timer_enable
#define hinic3_glb_pf_vf_offset   sdk_glb_pf_vf_offset
#define hinic3_get_bond_create_mode   sdk_get_bond_create_mode
#define hinic3_global_func_id   sdk_global_func_id
#define hinic3_host_id   sdk_host_id
#define hinic3_host_oq_id_mask   sdk_host_oq_id_mask
#define hinic3_host_total_func   sdk_host_total_func
#define hinic3_intr_num   sdk_intr_num
#define hinic3_max_pf_num   sdk_max_pf_num
#define hinic3_misx_intr_clear_resend_bit   sdk_misx_intr_clear_resend_bit
#define hinic3_pcie_itf_id   sdk_pcie_itf_id
#define hinic3_pf_id_of_vf   sdk_pf_id_of_vf
#define hinic3_physical_port_id   sdk_physical_port_id
#define hinic3_ppf_idx   sdk_ppf_idx
#define hinic3_set_func_svc_used_state   sdk_set_func_svc_used_state
#define hinic3_set_interrupt_cfg   sdk_set_interrupt_cfg
#define hinic3_set_msix_auto_mask_state   sdk_set_msix_auto_mask_state
#define hinic3_set_msix_state   sdk_set_msix_state
#define hinic3_set_ppf_flr_type   sdk_set_ppf_flr_type
#define hinic3_stateful_deinit   sdk_stateful_deinit
#define hinic3_stateful_init   sdk_stateful_init
#define hinic3_support_ppa   sdk_support_ppa
#define hinic3_support_fc   sdk_support_fc
#define hinic3_support_ipsec   sdk_support_ipsec
#define hinic3_support_migr   sdk_support_migr
#define hinic3_support_nic   sdk_support_nic
#define hinic3_support_ovs   sdk_support_ovs
#define hinic3_support_vbs   sdk_support_vbs
#define hinic3_support_rdma   sdk_support_rdma
#define hinic3_support_roce   sdk_support_roce
#define hinic3_support_toe   sdk_support_toe
#define hinic3_vector_to_eqn   sdk_vector_to_eqn
#define hinic3_vf_in_pf   sdk_vf_in_pf
#define hinic3_func_max_nic_qnum sdk_func_max_nic_qnum

#endif
#endif
